home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / X11 / extensions / XKBui.h < prev    next >
C/C++ Source or Header  |  2006-04-12  |  5KB  |  195 lines

  1. #ifndef XKBUI_H
  2. #define    XKBUI_H 1
  3. /* $XConsortium: XKBui.h /main/2 1995/12/07 21:18:19 kaleb $ */
  4. /************************************************************
  5.  Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc.
  6.  
  7.  Permission to use, copy, modify, and distribute this
  8.  software and its documentation for any purpose and without
  9.  fee is hereby granted, provided that the above copyright
  10.  notice appear in all copies and that both that copyright
  11.  notice and this permission notice appear in supporting
  12.  documentation, and that the name of Silicon Graphics not be 
  13.  used in advertising or publicity pertaining to distribution 
  14.  of the software without specific prior written permission.
  15.  Silicon Graphics makes no representation about the suitability 
  16.  of this software for any purpose. It is provided "as is"
  17.  without any express or implied warranty.
  18.  
  19.  SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
  20.  SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 
  21.  AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
  22.  GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 
  23.  DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 
  24.  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 
  25.  OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
  26.  THE USE OR PERFORMANCE OF THIS SOFTWARE.
  27.  
  28.  ********************************************************/
  29. /* $XFree86$ */
  30.  
  31. #include <X11/Xlib.h>
  32. #include <X11/XKBlib.h>
  33. #include <X11/extensions/XKBgeom.h>
  34.  
  35. typedef struct _XkbUI_View    *XkbUI_ViewPtr;
  36.  
  37. typedef struct _XkbUI_ViewOpts {
  38.     unsigned int    present;
  39.     unsigned int    fg;
  40.     unsigned int    bg;
  41.     unsigned int    label_mode;
  42.     unsigned int    color_mode;
  43.     XRectangle    viewport;
  44.     unsigned int    margin_width;
  45.     unsigned int    margin_height;
  46.     Colormap    cmap;
  47. } XkbUI_ViewOptsRec,*XkbUI_ViewOptsPtr;
  48.  
  49.     /*
  50.      * legal values for present field of a view options
  51.      */
  52. #define    XkbUI_BackgroundMask    (1<<0)
  53. #define    XkbUI_ForegroundMask    (1<<1)
  54. #define    XkbUI_LabelModeMask    (1<<2)
  55. #define    XkbUI_ColorModeMask    (1<<3)
  56. #define    XkbUI_WidthMask        (1<<4)
  57. #define    XkbUI_HeightMask    (1<<5)
  58. #define    XkbUI_XOffsetMask    (1<<6)
  59. #define    XkbUI_YOffsetMask    (1<<7)
  60. #define    XkbUI_ColormapMask    (1<<8)
  61. #define    XkbUI_MarginWidthMask    (1<<9)
  62. #define    XkbUI_MarginHeightMask    (1<<10)
  63.  
  64. #define    XkbUI_SizeMask        (XkbUI_WidthMask|XkbUI_HeightMask)
  65. #define    XkbUI_OffsetMask    (XkbUI_XOffsetMask|XkbUI_YOffsetMask)
  66. #define    XkbUI_MarginMask    (XkbUI_MarginWidthMask|XkbUI_MarginHeightMask)
  67. #define    XkbUI_AllViewOptsMask    (0x7ff)
  68.  
  69.     /*
  70.      * legal values for the label_mode of a view options
  71.      */
  72. #define    XkbUI_NoLabels        0
  73. #define    XkbUI_KeyCodes        1
  74. #define    XkbUI_KeyNames        2
  75. #define    XkbUI_StateSyms        3
  76. #define    XkbUI_MultiSyms        4
  77.  
  78. typedef struct _XkbUI_Select {
  79.     unsigned        type;
  80.     XkbSectionPtr        section;
  81.     XkbKeyPtr        key;
  82.     XkbDoodadPtr        doodad;
  83. } XkbUI_SelectRec,*XkbUI_SelectPtr;
  84.  
  85.     /*
  86.      * legal values for 'type' field of a selection report
  87.      */
  88.  
  89. #define    XkbUI_Keys        0
  90. #define    XkbUI_Indicators    1
  91. #define    XkbUI_TextLabels    2
  92. #define    XkbUI_SolidShapes    3
  93. #define    XkbUI_Outlines        4
  94. #define    XkbUI_Logos        5
  95. #define    XkbUI_Sections        6
  96.  
  97.     /*
  98.      * legal values for 'which' field of a select call
  99.      */
  100. #define    XkbUI_KeysMask        (1<<0)
  101. #define    XkbUI_IndicatorsMask    (1<<1)
  102. #define    XkbUI_TextLabelsMask    (1<<2)
  103. #define    XkbUI_SolidShapesMask    (1<<3)
  104. #define    XkbUI_OutlinesMask    (1<<4)
  105. #define    XkbUI_LogosMask        (1<<5)
  106. #define    XkbUI_SectionsMask    (1<<6)
  107.  
  108.     /*
  109.      * legal values for key appearance flag
  110.      */
  111. #define    XkbUI_KeyDown        (1<<0)
  112. #define    XkbUI_Highlight        (1<<1)
  113.  
  114. _XFUNCPROTOBEGIN
  115.  
  116. extern    XkbUI_ViewPtr XkbUI_SimpleInit(
  117.     Display *        /* dpy */,
  118.     Window            /* win */,
  119.     int            /* width */,
  120.     int            /* height */
  121. );
  122.  
  123. extern    XkbUI_ViewPtr XkbUI_Init(
  124.     Display *        /* dpy */,
  125.     Window            /* win */,
  126.     int            /* width */,
  127.     int            /* height */,
  128.     XkbDescPtr        /* xkb */,
  129.     XkbUI_ViewOptsPtr    /* view */
  130. );
  131.  
  132. extern Status XkbUI_SetViewOpts(
  133.     XkbUI_ViewPtr        /* view */,
  134.     XkbUI_ViewOptsPtr    /* opts */
  135. );
  136.  
  137. extern Status XbUI_GetViewOpts(
  138.     XkbUI_ViewPtr        /* view */,
  139.     XkbUI_ViewOptsPtr    /* opts_rtrn */
  140. );
  141.  
  142. extern    Status XkbUI_SetCanvasSize(
  143.     XkbUI_ViewPtr        /* view */,
  144.     int            /* width */,
  145.     int            /* height */
  146. );
  147.  
  148. extern    Status XkbUI_GetCanvasSize(
  149.     XkbUI_ViewPtr        /* view */,
  150.     int *            /* width_rtrn */,
  151.     int *            /* height_rtrn */
  152. );
  153.  
  154. extern Bool XkbUI_SetKeyAppearance(
  155.     XkbUI_ViewPtr        /* view */,
  156.     KeyCode            /* kc */,
  157.     unsigned        /* flags */
  158. );
  159.  
  160. extern Bool XkbUI_SetKeyAppearanceByName(
  161.     XkbUI_ViewPtr        /* view */,
  162.     XkbKeyNamePtr        /* name */,
  163.     unsigned        /* flags */
  164. );
  165.  
  166. extern Bool XkbUI_ResetKeyAppearance(
  167.     XkbUI_ViewPtr        /* view */,
  168.     unsigned int        /* mask */,
  169.     unsigned int        /* values */
  170. );
  171.  
  172. extern Bool XkbUI_DrawRegion(
  173.     XkbUI_ViewPtr        /* view */,
  174.     XRectangle *        /* viewport */
  175. );
  176.  
  177. extern Bool XkbUI_DrawChanged(
  178.     XkbUI_ViewPtr        /* view */,
  179.     XRectangle *        /* viewport */,
  180.     XkbChangesPtr        /* changes */,
  181.     int            /* num_keys */,
  182.     XkbKeyNamePtr        /* keys */
  183. );
  184.  
  185. extern Bool XkbUI_Select(
  186.     XkbUI_ViewPtr        /* view */,
  187.     XPoint *        /* coord */,
  188.     unsigned int        /* which */,
  189.     XkbSectionPtr        /* section */
  190. );
  191.  
  192. _XFUNCPROTOEND
  193.  
  194. #endif /* XKBUI_H */
  195.